<template>
    <div class="category">
        <h3>{{title}}</h3>
        <slot :food="foods" :go="films">插槽的默认内容......</slot>
    </div>
</template>

<script>
    export default {
        name:"Category",
        props:['title'],
        data() {
            return {
                foods:['火锅','牛排','地锅鸡','小龙虾','烧烤'],
                films:['不是药神','生死狙击','流浪地球','画皮','让子弹飞']
            }
        }
    }
</script>

<style scoped>
    .category {
        background-color: antiquewhite;
        width: 200px;
        height: 300px;
    }
    h3 {
        background-color: aqua;
        text-align: center;
    }
</style>